/**
 * jims
 */
package com.jims.master.modules.drug.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jims.master.common.persistence.DataEntity;
import org.hibernate.validator.constraints.Length;

import java.beans.Transient;
import java.util.Date;

/**
 * 药品库存管理Entity
 *
 * @author zhuq
 * @version 2017-03-10
 */
public class DrugStock extends DataEntity<DrugStock> {

    private static final long serialVersionUID = 1L;
    //private String drugCode;		// 药品编码
    //private String infoId;		// 价表ID
    private String storageId;        // 库存单位ID
    private String storageNames;  //库存单位
    private String supplierJcs;        //供应商别名
    private String drugNames;        //药品名称
    private String drugSpec;         //药品规格
    private String drugUnits;         //药品单位
    private String firmName;         //药品厂商
    private String amount;         //数量
    private String startTime;   //开始时间
    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    private String endTime;

    public String getDrugUnits() {
        return drugUnits;
    }

    public void setDrugUnits(String drugUnits) {
        this.drugUnits = drugUnits;
    }

    public String getFirmName() {
        return firmName;
    }

    public void setFirmName(String firmName) {
        this.firmName = firmName;
    }

    public String getAmount() {
        return amount;
    }

    public void setAmount(String amount) {
        this.amount = amount;
    }

    public String getCosts() {
        return costs;
    }

    public void setCosts(String costs) {
        this.costs = costs;
    }

    public String getAcceptBy() {
        return acceptBy;
    }

    public void setAcceptBy(String acceptBy) {
        this.acceptBy = acceptBy;
    }

    private String costs;         //费用

    public String getGiveBy() {
        return giveBy;
    }

    public void setGiveBy(String giveBy) {
        this.giveBy = giveBy;
    }

    private String giveBy;
    private String acceptBy;         //领药人


    public String getDrugSpec() {
        return drugSpec;
    }

    public void setDrugSpec(String drugSpec) {
        this.drugSpec = drugSpec;
    }

    private String accountPayed;
    private String additionalFee;
    private String accountIndicator;
    private String acctDate;
    private String acctOperator;
    private String tallyIndicator;
    private String tallyDate;
    private String tallyOperator;
    private String voucherNo;
    private String recoveryDocuNo;
    private String importOperator;
    private String importDate;

    public String getAccountIndicator() {
        return accountIndicator;
    }

    public void setAccountIndicator(String accountIndicator) {
        this.accountIndicator = accountIndicator;
    }

    public String getAcctDate() {
        return acctDate;
    }

    public void setAcctDate(String acctDate) {
        this.acctDate = acctDate;
    }

    public String getAcctOperator() {
        return acctOperator;
    }

    public void setAcctOperator(String acctOperator) {
        this.acctOperator = acctOperator;
    }

    public String getTallyIndicator() {
        return tallyIndicator;
    }

    public void setTallyIndicator(String tallyIndicator) {
        this.tallyIndicator = tallyIndicator;
    }

    public String getTallyDate() {
        return tallyDate;
    }

    public void setTallyDate(String tallyDate) {
        this.tallyDate = tallyDate;
    }

    public String getTallyOperator() {
        return tallyOperator;
    }

    public void setTallyOperator(String tallyOperator) {
        this.tallyOperator = tallyOperator;
    }

    public String getVoucherNo() {
        return voucherNo;
    }

    public void setVoucherNo(String voucherNo) {
        this.voucherNo = voucherNo;
    }

    public String getRecoveryDocuNo() {
        return recoveryDocuNo;
    }

    public void setRecoveryDocuNo(String recoveryDocuNo) {
        this.recoveryDocuNo = recoveryDocuNo;
    }

    public String getImportOperator() {
        return importOperator;
    }

    public void setImportOperator(String importOperator) {
        this.importOperator = importOperator;
    }

    public String getImportDate() {
        return importDate;
    }

    public void setImportDate(String importDate) {
        this.importDate = importDate;
    }

    public String getAdditionalFee() {
        return additionalFee;
    }

    public void setAdditionalFee(String additionalFee) {
        this.additionalFee = additionalFee;
    }

    public String getAccountPayed() {
        return accountPayed;
    }

    public void setAccountPayed(String accountPayed) {
        this.accountPayed = accountPayed;
    }

    public Double getAccountReceivable() {
        return accountReceivable;
    }

    public void setAccountReceivable(Double accountReceivable) {
        this.accountReceivable = accountReceivable;
    }

    public Double accountReceivable;


    //private String packageNum;		// 包装数量
    //private String packageSpec;		// 包装规格
    //private String packageUnits;		// 包装单位
    //private String minSpec;		// 最小规格
    //private String minUnits;		// 最小单位
    //private Double purchasePrice;		// 进货价
    //private String discount;		// 折扣
    //private String batchNo;		// 批号
    //private Date expireDate;		// 有效期
    //private Double quantity;		// 小包装库存量
    //private String documentNo;		// 入库单号
    private String location;        // 货位
    //private String drugName;        //药品名称
    private String drugType;        //药品类型

    public String getMasterId() {
        return masterId;
    }

    public void setMasterId(String masterId) {
        this.masterId = masterId;
    }

    public String getItemNo() {
        return itemNo;
    }

    public void setItemNo(String itemNo) {
        this.itemNo = itemNo;
    }

    public Double getInventory() {
        return inventory;
    }

    public void setInventory(Double inventory) {
        this.inventory = inventory;
    }

    public DrugPrice getDrugPrice() {
        return drugPrice;
    }

    public void setDrugPrice(DrugPrice drugPrice) {
        this.drugPrice = drugPrice;
    }

    public DrugStock getDrugStock() {
        return drugStock;
    }

    public void setDrugStock(DrugStock drugStock) {
        this.drugStock = drugStock;
    }

    public String getTradePrice() {
        return tradePrice;
    }

    public void setTradePrice(String tradePrice) {
        this.tradePrice = tradePrice;
    }

    public Double getRetailPrice() {
        return retailPrice;
    }

    public void setRetailPrice(Double retailPrice) {
        this.retailPrice = retailPrice;
    }

    public String getExportClass() {
        return exportClass;
    }

    public void setExportClass(String exportClass) {
        this.exportClass = exportClass;
    }

    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    public Date getExportDate() {
        return exportDate;
    }

    public void setExportDate(Date exportDate) {
        this.exportDate = exportDate;
    }

    public String getStorageName() {
        return storageName;
    }

    public void setStorageName(String storageName) {
        this.storageName = storageName;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    //private String importMasterId;   //入库单ID
    private String purchaseNumber;        // 采购序号
    private String expireDateGet;            //有效期
    private String supplierId;//供应商ID

    private String type;//扩展类型

    private String masterId;        // 出库主表ID
    private String itemNo;        // 序号
    private String infoId;        // drug_info表ID
    private String drugCode;        // 药品编码
    private String packageNum;        // 包装数量
    private String packageSpec;        // 包装规格
    private String packageUnits;        // 包装单位
    private String minSpec;        // 最小规格
    private String minUnits;        // 最小单位
    private String batchNo;        // 批号

    public Double getQuantityIn() {
        return quantityIn;
    }

    public void setQuantityIn(Double quantityIn) {
        this.quantityIn = quantityIn;
    }

    public Double getQuantityOut() {
        return quantityOut;
    }

    public void setQuantityOut(Double quantityOut) {
        this.quantityOut = quantityOut;
    }

    private Date expireDate;        // 有效期
    private Double purchasePrice;        // 出库价
    private String discount;        // 折扣
    private Double quantityIn;
    private Double quantityOut;
    private Double quantity;        // 出库大包装数量
    private Double inventory;        // 出库后库存数(大包装)
    private String importMasterId;        // 对应的入库主表ID
    private DrugPrice drugPrice;     //药品价格
    private DrugStock drugStock;    //药品库存
    //private DrugInfo drugInfo;      //药品信息
    //private DrugStorageDept drugStorageDept;  //库存单位
    // private DrugInoutClass drugInoutClass;    //出库类别
    // private DrugExportMaster drugExportMaster;  //出库主表
    private String drugName; //药品名称
    // private DrugSupplierCata drugSupplierCata;  //供应商

    //    扩展
    private String tradePrice; //进货价
    private Double retailPrice;//零售价
    private String exportClass;//出库类别
    private String receiver;//发往
    private Date exportDate;//出库日期
    private String documentNo;//出库单号
    private String storageName;//发货单位
    private int index;//序号

    @Transient
    public String getExpireDateGet() {
        return expireDateGet;
    }

    @Transient
    public void setExpireDateGet(String expireDateGet) {
        this.expireDateGet = expireDateGet;
    }

    @Transient
    public String getPurchaseNumber() {
        return purchaseNumber;
    }

    @Transient
    public void setPurchaseOrder(String purchaseNumber) {
        this.purchaseNumber = purchaseNumber;
    }

    //扩展
    private Boolean batch;  //是否选中
    private DrugInoutClass drugInoutClass;   //入出库类别
    private DrugInoutNewClass drugInoutNewClass;   //入出库类别

    public DrugInoutNewClass getDrugInoutNewClass() {
        return drugInoutNewClass;
    }

    public void setDrugInoutNewClass(DrugInoutNewClass drugInoutNewClass) {
        this.drugInoutNewClass = drugInoutNewClass;
    }

    public void setPurchaseNumber(String purchaseNumber) {
        this.purchaseNumber = purchaseNumber;
    }

    private DrugSupplierCata drugSupplierCata; //供货单位
    private DrugInfo drugInfo;        // 药品信息
    private DrugDict drugDict;       //药品字典表  --用于获取药品名称，页面显示
    private DrugStorageDept drugStorageDept; // 厂家标识
    private DrugExportMaster drugExportMaster; //出库主表 --用于批量入库时查询
    private DrugExportDetail drugExportDetail;  //出库明细表  --用于批量入库时查询
    private DrugImportMaster drugImportMaster;    //入库主表
    private DrugImportDetail drugImportDetail;    //入库明细表
    private String storageIdOut; //出库单位--临时字段
    private String storageIdIn; //入库单位--临时字段
    private String importClass;//入库类型--临时字段
    private String drugOutSpec; //发药临时字段，保存待发药的规格
    private String storageFrom;
    private String supplier;
    private String minUnitsName;    //
    private String packageUnitsName;    //
    private Date startDate;//入库时间

    @Transient
    public Date getStartDate() {
        return startDate;
    }

    @Transient
    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    @Transient
    public String getMinUnitsName() {
        return minUnitsName;
    }

    @Transient
    public String getPackageUnitsName() {
        return packageUnitsName;
    }

    @Transient
    public void setPackageUnitsName(String packageUnitsName) {
        this.packageUnitsName = packageUnitsName;
    }

    @Transient
    public void setMinUnitsName(String minUnitsName) {
        this.minUnitsName = minUnitsName;
    }

    @Transient
    public String getSupplierJcs() {
        return supplierJcs;
    }

    @Transient
    public void setSupplierJcs(String supplierJcs) {
        this.supplierJcs = supplierJcs;
    }

    @Transient
    public String getStorageNames() {
        return storageNames;
    }

    @Transient
    public void setStorageNames(String storageNames) {
        this.storageNames = storageNames;
    }

    @Transient
    public String getDrugNames() {
        return drugNames;
    }

    @Transient
    public void setDrugNames(String drugNames) {
        this.drugNames = drugNames;
    }

    public DrugNameDict getDrugNameDict() {
        return drugNameDict;
    }

    public void setDrugNameDict(DrugNameDict drugNameDict) {
        this.drugNameDict = drugNameDict;
    }

    private DrugNameDict drugNameDict;

    @Transient
    public String getDrugName() {
        return drugName;
    }

    @Transient
    public void setDrugName(String drugName) {
        this.drugName = drugName;
    }

    @Transient
    public String getDrugType() {
        return drugType;
    }

    @Transient
    public void setDrugType(String drugType) {
        this.drugType = drugType;
    }

    public DrugInfo getDrugInfo() {
        return drugInfo;
    }

    public void setDrugInfo(DrugInfo drugInfo) {
        this.drugInfo = drugInfo;
    }

    @Transient
    public String getStorageIdOut() {
        return storageIdOut;
    }

    public void setStorageIdOut(String storageIdOut) {
        this.storageIdOut = storageIdOut;
    }

    @Transient
    public String getStorageIdIn() {
        return storageIdIn;
    }

    public void setStorageIdIn(String storageIdIn) {
        this.storageIdIn = storageIdIn;
    }

    @Transient
    public String getImportClass() {
        return importClass;
    }

    public void setImportClass(String importClass) {
        this.importClass = importClass;
    }

    public DrugStock() {
        super();
    }

    public DrugStock(String id) {
        super(id);
    }

    @Length(min = 1, max = 32, message = "药品编码长度必须介于 1 和 32 之间")
    public String getDrugCode() {
        return drugCode;
    }

    public void setDrugCode(String drugCode) {
        this.drugCode = drugCode;
    }

    @Length(min = 1, max = 64, message = "drugInfoID长度必须介于 1 和 64 之间")
    public String getInfoId() {
        return infoId;
    }

    public void setInfoId(String infoId) {
        this.infoId = infoId;
    }

    @Length(min = 1, max = 64, message = "库存单位长度必须介于 1 和 64 之间")
    public String getStorageId() {
        return storageId;
    }

    public void setStorageId(String storageId) {
        this.storageId = storageId;
    }

    @Length(min = 0, max = 8, message = "包装数量长度必须介于 0 和 8 之间")
    public String getPackageNum() {
        return packageNum;
    }

    public void setPackageNum(String packageNum) {
        this.packageNum = packageNum;
    }

    @Length(min = 1, max = 20, message = "包装规格长度必须介于 1 和 20 之间")
    public String getPackageSpec() {
        return packageSpec;
    }

    public void setPackageSpec(String packageSpec) {
        this.packageSpec = packageSpec;
    }

    @Length(min = 1, max = 2, message = "包装单位长度必须介于 1 和 2 之间")
    public String getPackageUnits() {
        return packageUnits;
    }

    public void setPackageUnits(String packageUnits) {
        this.packageUnits = packageUnits;
    }

    @Length(min = 1, max = 20, message = "最小规格长度必须介于 1 和 20 之间")
    public String getMinSpec() {
        return minSpec;
    }

    public void setMinSpec(String minSpec) {
        this.minSpec = minSpec;
    }

    @Length(min = 1, max = 2, message = "最小单位长度必须介于 1 和 2 之间")
    public String getMinUnits() {
        return minUnits;
    }

    public void setMinUnits(String minUnits) {
        this.minUnits = minUnits;
    }

    public Double getPurchasePrice() {
        return purchasePrice;
    }

    public void setPurchasePrice(Double purchasePrice) {
        this.purchasePrice = purchasePrice;
    }

    public String getDiscount() {
        return discount;
    }

    public void setDiscount(String discount) {
        this.discount = discount;
    }

    @Length(min = 1, max = 64, message = "批号长度必须介于 1 和 64 之间")
    public String getBatchNo() {
        return batchNo;
    }

    public void setBatchNo(String batchNo) {
        this.batchNo = batchNo;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(Date expireDate) {
        this.expireDate = expireDate;
    }

    @Length(min = 0, max = 8, message = "小包装库存量长度必须介于 0 和 8 之间")
    public Double getQuantity() {
        return quantity;
    }

    public void setQuantity(Double quantity) {
        this.quantity = quantity;
    }

    @Length(min = 1, max = 64, message = "入库单号长度必须介于 1 和 64 之间")
    public String getDocumentNo() {
        return documentNo;
    }

    public void setDocumentNo(String documentNo) {
        this.documentNo = documentNo;
    }

    @Length(min = 1, max = 64, message = "货位长度必须介于 1 和 64 之间")
    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public DrugStorageDept getDrugStorageDept() {
        return drugStorageDept;
    }

    public void setDrugStorageDept(DrugStorageDept drugStorageDept) {
        this.drugStorageDept = drugStorageDept;
    }

    public String getImportMasterId() {
        return importMasterId;
    }

    public void setImportMasterId(String importMasterId) {
        this.importMasterId = importMasterId;
    }

    @Transient
    public Boolean getBatch() {
        return batch;
    }

    public void setBatch(Boolean batch) {
        this.batch = batch;
    }

    public DrugInoutClass getDrugInoutClass() {
        return drugInoutClass;
    }

    public void setDrugInoutClass(DrugInoutClass drugInoutClass) {
        this.drugInoutClass = drugInoutClass;
    }

    public DrugSupplierCata getDrugSupplierCata() {
        return drugSupplierCata;
    }

    public void setDrugSupplierCata(DrugSupplierCata drugSupplierCata) {
        this.drugSupplierCata = drugSupplierCata;
    }

    @Transient
    public String getDrugOutSpec() {
        return drugOutSpec;
    }

    public void setDrugOutSpec(String drugOutSpec) {
        this.drugOutSpec = drugOutSpec;
    }

    public DrugExportMaster getDrugExportMaster() {
        return drugExportMaster;
    }

    public void setDrugExportMaster(DrugExportMaster drugExportMaster) {
        this.drugExportMaster = drugExportMaster;
    }

    public DrugExportDetail getDrugExportDetail() {
        return drugExportDetail;
    }

    public void setDrugExportDetail(DrugExportDetail drugExportDetail) {
        this.drugExportDetail = drugExportDetail;
    }

    public DrugDict getDrugDict() {
        return drugDict;
    }

    public void setDrugDict(DrugDict drugDict) {
        this.drugDict = drugDict;
    }

    public DrugImportMaster getDrugImportMaster() {
        return drugImportMaster;
    }

    public void setDrugImportMaster(DrugImportMaster drugImportMaster) {
        this.drugImportMaster = drugImportMaster;
    }

    public DrugImportDetail getDrugImportDetail() {
        return drugImportDetail;
    }

    public void setDrugImportDetail(DrugImportDetail drugImportDetail) {
        this.drugImportDetail = drugImportDetail;
    }

    @Transient
    public String getStorageFrom() {
        return storageFrom;
    }

    public void setStorageFrom(String storageFrom) {
        this.storageFrom = storageFrom;
    }

    @Transient
    public String getSupplier() {
        return supplier;
    }

    public void setSupplier(String supplier) {
        this.supplier = supplier;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(String supplierId) {
        this.supplierId = supplierId;
    }
}